class Test {
    //此类没有构造函数会默认创建一个构造函数
    //相当于 constructor(){ }
    constructor(name) {
        this.name = name
    }
    get name() {
        console.log('getter');
        return this._name
    }
    set name(value) {
        console.log('setter');
        this._name = value
    }
}
let son = new Test('jj')//serter
console.log(son._name);//jj
son.name = 'gg'//setter
console.log(son._name);//gg
